package com.baidu.mpks.permission.service;

import com.baidu.mpks.permission.domain.PermissionData;
import com.baidu.mpks.permission.domain.PermissionDataRole;
import com.baidu.mpks.permission.dto.AuthInfoDto;
import com.baidu.mpks.permission.dto.UserDataPermissionDto;

import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.Set;

public interface PermissionManageService {

    Map<String, Map<String, Object>> getAllDataPermissionByUserIdAndRoleIdClassForNew(List<Integer> roleIds, String userId) throws IOException;

    Map<String, Object> getAllDataPermissionByUserIdAndRoleIdClassV3(List<Integer> roleIds, String userId) throws IOException;

    UserDataPermissionDto getDataPermissionByUserId(String userId);

    List<String> pushDataPermissionForNew(List<AuthInfoDto> authInfoDtoList) throws IOException;

    AuthInfoDto getDataPermissionByDataIdAndIdType(String dataId, String idType);

    Set<String> getSysProp();

    Map<String, Set<String>> setSourcePermission(Map<String, List<PermissionData>> rolePermissionDataMap, Map<String, Set<String>> sourceAuthInfo, Set<PermissionDataRole> openData);

    Map<String, List<PermissionData>> getRolePermissionDataMap(List<Integer> roleIds, String userId);
}
